const ethers = require('ethers');

const url = "http://localhost:7545";
const provider = new ethers.providers.JsonRpcProvider(url);
const address  = '0xf386B510eB04036174446684469029911832d1a6';


const privateKey = '2c568353e16c0af97fc7bf326acf72f2c609a5c0b410e91333e557ffcc9d2695';
const wallet = new ethers.Wallet(privateKey,provider);

const abi = [
    "function store(uint[] memory num) public",
    "function retrieve() public view returns (uint256)"
]
const contract = new ethers.Contract(address,abi,wallet);

 const send = async () =>{

    let overrides = {
        from: "0x86598cd3A668E4292b4F8Fd14dFac5A373779d55",
        gasLimit: 93000,
    
    };

    const tx = await contract.store([3333,33,11,44], overrides);
    console.log(tx);
 }

 const call = async () =>{
    const value = await contract.retrieve()
    return value
 }
const main = async () =>{
    await send()
    // const res = await call()
    // console.log( res.toString() );

}

main()